package 学生实验室勤工俭学模拟;

import java.util.Random;

public class Lab {
	public String name;//实验室名称
	public String level;//卫生评分
	public double income;//学生补助收入
	public double postIncome;
	
	public Lab() {}
	public Lab(String name,String level,double income) {
		this.name = name;
		this.level = level;
		this.income = income;
	}
	
	
	//获取实验室名称
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	//获取实验室卫生评分
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	//获取学生补助收入
	public double getIncome(double M) {
		M = income;
		return income;
	}
	public void setIncome(double income) {
		this.income = income;
	}
	public double getpostIncome(double N){
		N = postIncome;
		return postIncome;
	}
	public void setpostIncome(double postIncome) {
		//当学生的收入超过3000，月税率为0.05，一共清洁16周，即4个月
		/*if(income>3000) {
		postIncome = (1 - 0.05)*income;
		}*/
		this.postIncome = postIncome;
		
	}
	//一个学期按10周计算
	//等级：优秀为1，及格为0；
	//随机给实验室清洁分配等级作为学生的清洁检查情况
	//一次优秀x补助500，一次及格y补助300元
	public int x = 500,y = 300,m = 0;
	
	public Lab(int l,int X ,int Y,int Z,double M,double N) {
		Random L1 = new Random(1);
		for(int i = 1;i < 17;i++) {
			System.out.print(L1.nextInt(2) + " \n");
			i = l;
			if(l == 1) {
				M = M + x;
			}
			if(l == 0) {
				M = M + y;
			}
			M = income;
			//System.out.print(M+"\n");
		}
		if(income>3000) {
			postIncome = (1 - 0.05)*M;
			}
		N = postIncome;
	}
	
	
	public static void main(String[] args) {
		int x = 500,y = 300;double M=0;double N=0;
		Random L1 = new Random(1); 
		for(int i = 1;i < 17;i++) {
			int l = L1.nextInt(2);
			if(l == 1) {
				M = M + x;
				System.out.print("优秀"+"  ");
				//System.out.print(M+"\n");
			}
			if(l == 0) {
				M = M + y;
				System.out.print("及格"+"  ");
				//System.out.print(M+"\n");
			}
		}
		if(M>3000) {
			N = (1 - 0.05)*M;
			}
		System.out.println("\n学生"+"张三"+"的期末总收入为:"+M);
		System.out.println("学生"+"张三"+"税后的期末总收入为："+N);
	}
	
}